import requests
from threading import Thread
from multiprocessing import Process
import time


def request_doge(index):
    url = "https://www.dogedoge.com/"
    headers = {
       "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"
    }
    response = requests.get(url=url, headers=headers)
    print(f'当前请求序号：{index}, 返回结果状态码：{response.status_code}')


if __name__ == "__main__":
     for i in range(10):
        t = Thread(target=request_doge, args=(i, ))
        t.start()
        p = Process(target=request_doge, args=(i, ))
        p.start()
